package com.corgi.message.kafka.consumer;

import com.corgi.message.kafka.domain.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @title: ConsumerListener
 * @description: 消费者监听
 * @author: dengmiao
 * @create: 2019-10-11 10:02
 **/
@Slf4j
@Component
public class ConsumerListener {

	@KafkaListener(topics = "sf-2")
	public void consumer(String message) {
		log.info("sf-2", message);
	}


	@KafkaListener(topics = "sf-users")
	public void consumer(User user) {
		log.info("sf-users {}", user);
	}
}
